/*
 * 热重载 overload
 * */
public class MethodOverLoad {
    public static void main(String[] args) {
        int i2 = getSum(1, 2);
        int i3 = getSum(1, 2, 3);
        double d2 = getSum(1.1, 2.9);
        System.out.println(i2);
        System.out.println(i3);
        System.out.println(d2);
    }

    public static int getSum(int a, int b) {
        return a + b;
    }

    public static int getSum(int a, int b, int c) {
        return a + b + c;
    }

    public static double getSum(double a, double b) {
        return a + b;
    }
}